gnutls: Allow enabling smart card support as option.
authorNikos Mavrogiannopoulos <[email protected]>
Fri, 20 Jun 2014 15:56:15 +0000 (17:56 +0200)
committerNikos Mavrogiannopoulos <[email protected]>
Fri, 20 Jun 2014 15:56:15 +0000 (17:56 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <[email protected]>
libs/gnutls/Config.in
libs/gnutls/Makefile

index b2f25746c3cce1046a9b6cd5fcd6a363d0f4f77f..0c68b5bcedc47423a15dba0cfb2b6f0e4ae1593a 100644 (file)
@@ -31,6 +31,11 @@ config GNUTLS_PSK
 config GNUTLS_ANON
        bool "enable anonymous authentication support"
 
+config GNUTLS_PKCS11
+       bool "enable smart card (PKCS11) support"
+       select GNUTLS_EXT_LIBTASN1
+       default n
+
 config GNUTLS_EXT_LIBTASN1
        bool "use external libtasn1"
        default n
index 46e018776123ab0aa12d2c135c459f04c83a23bf..ef06a05d861bf0221f5dba3a1ae098135c64e437 100644 (file)
@@ -75,7 +75,7 @@ endef
 define Package/libgnutls
 $(call Package/gnutls/Default)
   TITLE+= (library)
-  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1
+  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit
 endef
 
 define Package/libgnutls/description
@@ -106,13 +106,16 @@ CONFIGURE_ARGS+= \
        --disable-doc \
        --disable-tests \
        --disable-rsa-export \
-       --disable-crywrap \
-       --without-p11-kit
+       --disable-crywrap
 
 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y)
 CONFIGURE_ARGS += --with-included-libtasn1
 endif
 
+ifneq ($(CONFIG_GNUTLS_PKCS11),y)
+CONFIGURE_ARGS += --without-p11-kit
+endif
+
 ifeq ($(CONFIG_LIBNETTLE_MINI),y)
 CONFIGURE_ARGS += --with-nettle-mini
 endif
@@ -209,6 +212,11 @@ ifeq ($(CONFIG_GNUTLS_PSK),y)
                $(PKG_INSTALL_DIR)/usr/bin/psktool \
                $(1)/usr/bin/
 endif
+ifeq ($(CONFIG_GNUTLS_PKCS11),y)
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/bin/p11tool \
+               $(1)/usr/bin/
+endif
 endef